#!/usr/bin/env python
# encoding: utf-8
# @Time    : 2019/10/11 15:53
# @Author  : ZRD
# @Site    :
# @File    : hprose_server.py
# @Software: PyCharm
import hprose


class MyFilter(object):
    def inputFilter(self, data, context):
        print(data)
        return data

    def outputFilter(self, data, context):
        print(data)
        return data


def send_data(data):
    print(data)
    return data


def main():
    server = hprose.HttpServer(port=8181)
    server.debug = True

    server.addFunction(send_data)


    server.start()


if __name__ == '__main__':
    main()
